﻿using System;
using System.Windows;
using System.Windows.Input;

namespace ISMv1.Controls
{

    public partial class TriggeringQuestionDialog : Window
    {
        public String TriggeringQuestion { get; set; }
        public bool WasOkClicked { get; set; }

        public TriggeringQuestionDialog( String currentTriggerinQuestionText)
        {
            InitializeComponent();
            txt_TriggeringQuestion.DataContext = this;
            TriggeringQuestion = currentTriggerinQuestionText;
        }


        private void Button_Ok_Click(object sender, RoutedEventArgs e)
        {
            WasOkClicked = true;
            this.Hide();
        }

        private void Button_Cancel_Click(object sender, RoutedEventArgs e)
        {
            this.Hide();
        }

        private void txt_TriggeringQuestion_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                this.Hide();
            }
        }
    }
}
